package slim3.controller.member.todo;

import java.util.logging.Logger;
import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;

import slim3.dao.CategoryDao;
import slim3.dao.TaskDao;

public class IndexController extends Controller {

    @SuppressWarnings("unused")
    private static final Logger logger =
        Logger.getLogger(IndexController.class.getName());

    private TaskDao dao = new TaskDao();
    private CategoryDao categoryDao = new CategoryDao();
    @Override
    public Navigation run() {
        requestScope("taskList", dao.findAll(false, categoryDao));
        requestScope("doneList", dao.findAll(true, categoryDao));
        requestScope("categories", categoryDao.findAll());
        return forward("index.jsp");
    }
}
